anti-prime Sequences
Time Limit: 3000MS
Memory Limit: 30000K
Total Submissions: 3355
Accepted: 1531
DescriptionGiven a sequence of consecutive integers n,n+1,n+2,..., m, an anti-prime sequence are a rearrangement of these integers so t Hat each adjacent pair of integers sums to a composite (non-prime) number. For example, if n = 1 and M = ten, one such anti-prime sequence is 1,3,5,4,2,6,9,7,8,10. This is also the lexicographically f
Constraints
Time Limit: 3 secs, memory limit: 32 MBDescription
Given a sequence of consecutive integers n, n + 1, n + 2 ,..., m, an anti-prime sequence is a rearrangement of these integers so that each adjacent pair of integers sums to a composite (non-prime) number. for example, if n = 1 and M = 10, one such anti-prime SequenceIs 1, 3, 5, 4, 2, 6, 9, 7, 8, 10. this is also the lexicographically first such sequence. we can extend the definition by defining a degree
Anti-prime SequencesTime Limit: 6000/3000 ms (Java/Other) Memory Limit: 60000/30000 K (Java/Other)
Total Submission (s): 8 Accepted Submission (s): 5
Problem DescriptionGiven a sequence of consecutive integers n, n + 1, n + 2 ,..., m, an anti-prime sequence is a rearrangement of these integers so that each adjacent pair of integers sums to a composite (non-prime) number. for example, if n = 1 and m = 10, one such anti-prime sequence is. this is also the lexicographically first such sequence.
We
PS transductionShortcut key operation is invalid because there is no switch to English input stateCommon shortcut keysNew CTRL + NOpen Ctrl+oClose Ctrl+wSave Ctrl+sSave As Ctrl+shift+sSave as Web page format ctrl+alt+sUndo Ctrl + ZOne step forward ctrl+shift+zOne step backwards ctrl+alt+zWithdraw Ctrl+shift+fShear Ctrl+xCopy Ctrl + CPaste Ctrl + VNew Layer Ctrl+shift+nSelect All Ctrl + ACancel Selection Ctrl+dSelect All Ctrl+shift+dAnti-election ctrl+
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.